package com.tourism.service;

import com.github.pagehelper.PageInfo;
import com.tourism.entity.AttractionCollect;
import com.tourism.entity.AttractionCollectQuery;
import com.tourism.exception.GlobalException;

/**
 * 景点收藏service
 */
public interface AttractionCollectService {
    /**
     * 新增景点收藏
     *
     * @param attractionCollect
     * @return
     */
    boolean addAttractionCollect(AttractionCollect attractionCollect) throws GlobalException;

    /**
     * 判断是否已经被收藏过了
     *
     * @param attractionId
     * @return
     */
    boolean isCollected(Long attractionId);

    /**
     * 根据id查询景点收藏
     *
     * @param id
     * @return
     */
    AttractionCollect getAttractionCollectById(Long id);

    /**
     * 删除景点收藏
     *
     * @param id
     * @return
     */
    boolean deleteCollectByAttractionId(Long id);


    /**
     * 获取景点收藏分页列表
     *
     * @return
     */
    PageInfo<AttractionCollect> getAttractionCollectList(AttractionCollectQuery quer);
}
